//
//  HBShakeResultCountCell.m
//  HuoBao
//
//  Created by chaiyanan on 15/12/10.
//  Copyright © 2015年 jinxin. All rights reserved.
//

#import "HBShakeResultCountCell.h"

@implementation HBShakeResultCountCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.backgroundColor = [UIColor clearColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createCustomView];
    }
    return self;
}

- (void)createCustomView
{
    
    UILabel *titleLable = [self createLableWithTextColor:[LCCommon getColor:@"b1b1b1"] font:[UIFont boldSystemFontOfSize:11.0f] text:@"参与次数：" textAlignment:NSTextAlignmentLeft frame:CGRectMake(15, 12, SCREEN_WIDTH-30, 12) superView:self.contentView];
    [titleLable sizeToFit];
    CGRect frame = titleLable.frame;
    frame.origin = CGPointMake(15, 12);
    titleLable.frame = frame;
    
    self.countLable = [self createLableWithTextColor:[LCCommon getColor:@"fa9838"] font:[UIFont systemFontOfSize:11.0f] text:@"18" textAlignment:NSTextAlignmentLeft frame:CGRectMake(titleLable.x+titleLable.width, 12, SCREEN_WIDTH-30, titleLable.height) superView:self.contentView];
 
}

- (UILabel *)createLableWithTextColor:(UIColor *)color font:(UIFont *)font text:(NSString *)text textAlignment:(NSTextAlignment)textAlignment frame:(CGRect)frame superView:(UIView *)superView
{
    UILabel *lable = [[UILabel alloc]initWithFrame:frame];
    lable.textColor = color;
    lable.font = font;
    lable.text = text;
    lable.textAlignment = textAlignment;
    [superView addSubview:lable];
    return lable;
}



@end
